package org.hy.user.service;

import java.util.List;
import java.util.Map;

import org.hy.user.UserModel;
import org.hy.user.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component(value="userService")
public class UserService {

	@Autowired
	@Qualifier("sysUserDao")
	private UserDao userDao;
	
	
	
	public boolean addUser(Map<String,String> params){
		
		UserModel userModel = new UserModel();
		userModel.setName("王海洋");
		userModel.setPassword("123456");
		userModel.setGender("男");
		java.util.Date date = new java.util.Date();
		userModel.setBirthday(date);
		return userDao.insertUser(userModel);
	}
	
	public List<UserModel> getAllUser(){
		return userDao.queryAllUser();
	}
	
	
	
}
